<?php
/**
 * Class WithdrawalApply
 * Desc  代理商提现申请Model
 * Create on 2021/9/2 10:52
 * Create by wangyafang
 */

namespace app\api\model\xyb;


class AgentWithdrawalApply extends Base
{
    protected $name = 'xyb_agent_withdrawal_apply';

    protected $type = [
        'createtime'  =>  'timestamp:Y-m-d H:i:s',
    ];

    // 追加属性
    protected $append = [
        'status_text',
        'desc',
    ];

    public function getStatusList()
    {
        return ['0' => '审核', '1' => '成功', '-1' => '失败'];
    }

    public function getStatusTextAttr($value, $data)
    {
        $value = $value ? $value : (isset($data['status']) ? $data['status'] : '');
        $list = $this->getStatusList();
        return isset($list[$value]) ? $list[$value] : '';
    }

    public function getDescAttr($value, $data)
    {
        return '余额提现';
    }
}